package net.pr06bot.loader;

import java.applet.AppletContext;
import java.applet.AppletStub;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;

public class BotStub implements AppletStub {
	
	public static final HashMap<String, String> parameters = new HashMap<String, String>();

	public BotStub() {
		parameters.put("nodeid", "10");
		parameters.put("portoff", "0");
		parameters.put("lowmem", "0");
		parameters.put("free", "0");
	}
	
	public boolean isActive() {
		return true;
	}

	public URL getDocumentBase() {
		return getCodeBase();
	}

	public URL getCodeBase() {
		try {
			return new URL("http://divine-reality.no-ip.info");
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
		return null;
	}

	public String getParameter(String name) {
		return parameters.get(name);
	}

	public AppletContext getAppletContext() {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	public void appletResize(int width, int height) {
		throw new UnsupportedOperationException("Not supported yet.");
	}
	
	

}
